<script>
	import { useUserStore } from '@/store/modules/user.js'
	export default {
		onLaunch: function() {
			this.setHeader()
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
		methods:{
			setHeader(){
				let statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
				// #ifdef MP
				let menuButtonHeight = uni.getMenuButtonBoundingClientRect().height;
				let titleBarWidth = uni.getSystemInfoSync().windowWidth - uni.getMenuButtonBoundingClientRect().width - (uni.getSystemInfoSync().windowWidth - uni.getMenuButtonBoundingClientRect().right) * 2;
				let titleBarHeight = (uni.getMenuButtonBoundingClientRect().top - statusBarHeight) * 2 + menuButtonHeight;
				useUserStore().setWxHeader({
					'statusBarHeight':statusBarHeight,
					'menuButtonHeight':menuButtonHeight,
					'titleBarWidth':titleBarWidth,
					'titleBarHeight':titleBarHeight
				});
				// #endif
				// #ifdef APP
				useUserStore().setStatusBarHeight({
					'setStatusBarHeight':statusBarHeight
				})
				// #endif
			},
		}
	}
</script>

<style>
	/* #ifndef APP-PLUS-NVUE */
	@import './theme/iconfont.css';
	@import './theme/index.css';
	.hdsrh{background-color: #ffffff;height:80rpx;padding-bottom:10rpx;width:100%;position: fixed;left: 0;top: 0;z-index: 1010;}
	.hdsrh .back{width:50rpx;height: 50rpx;color: #666}
	.search{height: 60rpx;border-radius: 30rpx;background-color: #f6f6f6}
	.water-item{
		padding:15rpx 10rpx
	}
	.water-title{
		color:#434343;
		font-size: 28rpx;
		line-height: 1.5;
		margin-bottom: 10rpx;
	}
	.water-price{
		color:#ff4142;
		font-family: JDZH-Regular,sans-serif;
		margin-bottom: 8rpx;
	}
	.water-price-min{
		font-size: 22rpx;
	}
	.water-price-num{
		font-size: 32rpx;
	}
	.water-info{
		font-size: 22rpx;
		color:#999
	}
	.load-more{
		padding:30rpx 0 60rpx;
		color:#bbb;
		font-size: 26rpx;
	}
	.bottom-fix{
		position: fixed;
		z-index: 98;
		bottom: 0;
		left: 0;
		right: 0;
		box-shadow: 0 0.12rem 0.16rem 0.08rem rgb(0 0 0 / 12%);
	}
	.t-line{
		width: 100%;
		height: 4rpx;
		background-color: #f6f6f6;
	}
	.t-cur{
		color: #ff992a;
		font-weight: 700;
	}
	.t-cur .t-line{
		background-color: #ff992a;
	}
	.i-t-line{
		width: 40rpx;
		height: 5rpx;
		background-color: #ff992a;
	}
	.i-t-cur{
		color: #ffffff;
		font-weight: 700;
	}
	.i-t-cur .i-t-line{
		background-color: #ffffff;
	}
	/* #endif*/
</style>
